-- 用户表
CREATE TABLE users (
    id NUMBER PRIMARY KEY,
    username VARCHAR2(50) NOT NULL UNIQUE,
    password VARCHAR2(50) NOT NULL,
    create_time DATE DEFAULT SYSDATE
);

-- 武将表
CREATE TABLE generals (
    id NUMBER PRIMARY KEY,
    name VARCHAR2(50) NOT NULL,
    strategy NUMBER(3) NOT NULL,  -- 谋略
    force NUMBER(3) NOT NULL,     -- 武力
    agility NUMBER(3) NOT NULL,   -- 敏捷
    create_time DATE DEFAULT SYSDATE
);

-- 创建序列
CREATE SEQUENCE users_seq START WITH 1 INCREMENT BY 1;
CREATE SEQUENCE generals_seq START WITH 1 INCREMENT BY 1;

INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '曹操', 95, 80, 75);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '刘备', 88, 75, 70);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '孙权', 85, 70, 75);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '诸葛亮', 99, 60, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '周瑜', 97, 75, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '司马懿', 98, 70, 75);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '关羽', 85, 98, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '张飞', 70, 97, 75);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '赵云', 80, 96, 95);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '马超', 75, 95, 90);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '黄忠', 80, 92, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '吕布', 60, 100, 90);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '典韦', 65, 96, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '许褚', 60, 95, 75);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '夏侯惇', 80, 90, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '夏侯渊', 75, 88, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '张辽', 85, 92, 88);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '徐晃', 80, 90, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '张郃', 82, 88, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '庞德', 75, 91, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '甘宁', 78, 93, 90);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '太史慈', 75, 94, 88);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '孙策', 85, 93, 90);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '孙坚', 80, 92, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '吕蒙', 90, 85, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '陆逊', 96, 75, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '姜维', 92, 88, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '魏延', 75, 90, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '黄盖', 80, 85, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '程普', 78, 84, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '韩当', 70, 83, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '周泰', 65, 89, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '凌统', 70, 87, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '丁奉', 75, 86, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '徐盛', 78, 85, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '庞统', 97, 60, 70);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '法正', 93, 65, 70);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '荀彧', 96, 60, 70);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '郭嘉', 98, 65, 75);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '贾诩', 97, 60, 75);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '程昱', 92, 65, 70);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '荀攸', 94, 60, 70);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '鲁肃', 90, 70, 75);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '张昭', 88, 60, 70);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '诸葛瑾', 85, 65, 70);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '马岱', 75, 85, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '关平', 70, 86, 85);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '周仓', 60, 88, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '廖化', 75, 80, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '文聘', 78, 85, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '李典', 82, 80, 80);
INSERT INTO generals (id, name, strategy, force, agility) VALUES (generals_seq.NEXTVAL, '乐进', 75, 86, 80);
commit;